package com.mall.seckill.mq;

import com.alibaba.fastjson.JSONObject;
import com.mall.utils.SendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;


/**
 * 生产商
 *
 * @author ASUS
 * @date 2021/07/18
 */
@Component
public class Producer {

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    public void proOrder(String message){
        System.out.println("生产者发送消息");
        jmsMessagingTemplate.convertAndSend("order",message);
    }

}
